﻿using System;
namespace SymbolEditor.Addin.CodeDom
{
    interface ICodeDOMSerializer
    {
        void Dispose();
        /// <summary>
        /// 根据CodeCompileUnit实例自动生成代码
        /// </summary>
        /// <param name="compileUnit">CodeCompileUnit实例</param>
        /// <param name="codeItem">目标代码文件的ProjectItem实例</param>
        /// <param name="options">表示代码生成器使用的一组选项</param>
        void GenerateCodeFromCompileUnit(System.CodeDom.CodeCompileUnit compileUnit, 
                    EnvDTE.ProjectItem codeItem, System.CodeDom.Compiler.CodeGeneratorOptions options);
        /// <summary>
        ///  将从指定代码文件对应的ProjectItem实例编译进 System.CodeDom.CodeCompileUnit
        /// </summary>
        /// <param name="codeItem">代码文件对应的ProjectItem实例</param>
        /// <returns></returns>
        System.CodeDom.CodeCompileUnit Parse(EnvDTE.ProjectItem codeItem); 
    }
}
